from django.template.defaultfilters import slugify
from django.utils.http import urlquote
import urllib
import re

def generate_slug(text):
  return urlquote(text)
#  return urllib.quote(text)
#  return slugify(urllib.quote(re.sub('\s', '-', text).encode('utf-8')))[:50]


def word_split(text):
  t1 = text.replace(',', ' ')
  return t1.split()

def make_safe(text):
  return text.replace('>', '&gt;').replace('<', '&lt;')
